<div class="ciucourseCiustudents indexmatricula">

<?php $tokens=array( 0=> "", 1=>"Matricular" )  ?>
<?php echo $this->element("breadcrumb", array('tokens'=>$tokens) ); ?>
	<div>
		<form action="/ciu/ciucourse_ciustudents" id="CiucourseCiustudentIndexForm" method="post" accept-charset="utf-8">
			<div style="display:none;"><input type="hidden" name="_method" value="POST"></div>		
			Buscar documento:
			<input name="data[CiucourseCiustudent][document]" type="text" class="inputchico" id="CiucourseCiustudentDocument">
			<input type="submit" value="Confirmar">
		</form>
	</div>
	<table class="zebra" cellpadding="0" cellspacing="0">
	<thead>
	<tr>
		<th><?php echo $this->Paginator->sort('id');?></th>
		<th><?php echo $this->Paginator->sort('ciusubject_id');?></th>
		<th><?php echo $this->Paginator->sort('Estudiante');?></th>
		<th><?php echo $this->Paginator->sort('ciucurspersstate_id');?></th>
		<th><?php echo $this->Paginator->sort('transaction_number');?></th>
		<th><?php echo $this->Paginator->sort('payment_cost');?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
        </thead>
	<?php
	$i = 0;
	//var_dump($ciucourseCiustudents);
	foreach ($ciucourseCiustudents as $ciucourseCiustudent):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<td><?php echo $ciucourseCiustudent['CiucourseCiustudent']['id']; ?>&nbsp;</td>
		<td>
			<?php echo $ciucourseCiustudent['Ciusubject']['name']; ?>
		</td>
		<td>
			<?php echo $ciucourseCiustudent['Ciuuser']['document']
			            ."-". $ciucourseCiustudent['Ciuuser']['first_names']." ".$ciucourseCiustudent['Ciuuser']['last_names'] ;  ?>
		</td>
        <td>
		    <?php echo $ciucourseCiustudent['Ciucurspersstate']['name']; ?>
		</td>
        <td>
		    <?php echo $ciucourseCiustudent['CiucourseCiustudent']['transaction_number']; ?>
		</td>
        <td>
		    <?php echo $ciucourseCiustudent['CiucourseCiustudent']['payment_cost']; ?>
		</td>
		
		<td class="actions">
			<?php echo $this->Html->link(__('View', true), array('action' => 'view', $ciucourseCiustudent['CiucourseCiustudent']['id'])); ?>
                        
			<?php 
				if(   $ciucourseCiustudent['Ciucurspersstate']['id']==1 or $ciucourseCiustudent['Ciucurspersstate']['id']==2){
					echo $this->Html->link(__('Matriculate', true), array('action' => 'matriculate', $ciucourseCiustudent['CiucourseCiustudent']['id']));
				}else{
					
				}
            ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
    <div class="paginatorcounter">
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
	));
	?>	</div>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>|
		<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>
